<?php
$inputValueName = NULL;
$question = NULL;
if ($inputMedia instanceof BWInputMedia) {
    $question = $inputMedia->content;
    $inputType = $inputMedia->getInputType();
    if ($inputType instanceof BWKeyValueType) {
        $valuableList = $inputType->getInputableList();
    }
    $inputValue = $inputMedia->getInputValue(array('creatorId' => Blyn::app()->getCurrentUser()->getId()), FALSE);
    $inputValueContent = $inputValue->content;
    $inputValueName = $valuableList[$inputValueContent];
}
?>
<legend>Your input value</legend>
<?php if ($question != NULL && $inputValueName != NULL) { ?>
    <div><strong>Question:</strong><?php echo $question; ?></div>
    <div><strong>Your answer:<strong><?php echo $inputValueName; ?></div>
            <?php } else { ?>
                <div>Not find input value!!</div>
            <?php } ?>
            <div><?php
                echo $control->getLink('Check Result', array(
                    'cooker' => 'myPools|checkResult',
                    'inputMediaId' => $inputMedia->getId(),
                    'htmlOptions' => array('class' => 'btn')));
                ?></div>
            <?php
            if (isset($isCheckedResult)) {
                $totalCount = $inputMedia->getInputValueCount();
                ?>
                <legend>Result:</legend>

                <?php
                foreach ($valuableList as $id => $name) {
                    $count = $inputMedia->getInputValueCount(array('content' => $id));
                    ?>
                    <div><strong>Result for <?php echo $name; ?></strong></div>
                    <div class="progress">
                        <div class="bar" style="width: <?php echo $count / $totalCount * 100; ?>%"></div>
                    </div>
                <?php } ?>
            <?php } ?>




